//
//  NoteNetworkManager.h
//  todoApp
//
//  Created by wangyaqing on 15/4/18.
//  Copyright (c) 2015年 ll studio. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NoteNetworkManager : NSObject

@property (nonatomic, assign) BOOL isLoading;

//GET请求
- (void)getContentAtURL:(NSString *)url param:(NSDictionary*)param errorHandler:(void (^)(NSError *err))errorBlock successHandler:(void (^)(id data))successBlock;

//发送POST请求
-(void)postContentAtURL:(NSString *)url param:(NSDictionary*)param errorHandler:(void (^)(NSError *err))errorBlock successHandler:(void (^)(id data))successBlock;

//以form表单的形式上传数据
- (void)uploadContentAtURL:(NSString*)url param:(NSDictionary*)param andData:(NSData*)dat errorHandler:(void (^)(NSError *err))errorBlock successHandler:(void (^)(id data))successBlock;

- (void)postJsonAtURL:(NSString *)url param:(NSDictionary*)param errorHandler:(void (^)(NSError *err))errorBlock successHandler:(void (^)(id data))successBlock;

-(void)cancelAndDiscardURLConnection;

@end
